package org.pupil.rpc.protocol;

import java.io.Serializable;

public class MsgHeader implements Serializable {

    private short magic; // 魔数
    private byte version; // 协议版本号
    private byte msgType; // 数据类型
    private byte status; // 状态
    private long requestId; // 请求 ID
    private int serializationLen; // 序列化规则字节数组长度
    private byte[] serializations; // 序列化规则字节数组
    private int compressLen; // 压缩规则字节数组长度
    private byte[] compression; // 压缩规则字节数组
    private int msgLen; // 数据长度

    public MsgHeader() {
    }

    public short getMagic() {
        return magic;
    }

    public void setMagic(short magic) {
        this.magic = magic;
    }

    public byte getVersion() {
        return version;
    }

    public void setVersion(byte version) {
        this.version = version;
    }

    public byte getMsgType() {
        return msgType;
    }

    public void setMsgType(byte msgType) {
        this.msgType = msgType;
    }

    public byte getStatus() {
        return status;
    }

    public void setStatus(byte status) {
        this.status = status;
    }

    public long getRequestId() {
        return requestId;
    }

    public void setRequestId(long requestId) {
        this.requestId = requestId;
    }

    public int getSerializationLen() {
        return serializationLen;
    }

    public void setSerializationLen(int serializationLen) {
        this.serializationLen = serializationLen;
    }

    public byte[] getSerializations() {
        return serializations;
    }

    public void setSerializations(byte[] serializations) {
        this.serializations = serializations;
    }

    public int getCompressLen() {
        return compressLen;
    }

    public void setCompressLen(int compressLen) {
        this.compressLen = compressLen;
    }

    public byte[] getCompression() {
        return compression;
    }

    public void setCompression(byte[] compression) {
        this.compression = compression;
    }

    public int getMsgLen() {
        return msgLen;
    }

    public void setMsgLen(int msgLen) {
        this.msgLen = msgLen;
    }
}
